import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/index',
    name: 'index',
    component: () => import('../components/Index.vue'),
    children:[
      {path: '/index/upload',component: () => import('../components/Upload.vue')},
      {path: '/index/logistics',component: () => import('../components/Logistics.vue')},
      {path: '/index/user',component: () => import('../components/User.vue')},
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
